
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Supported Informix datatypes</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp46.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp48.htm" >Next</A>
<!-- End Header -->
<A NAME="CHEBFDGI"></A><h1>Supported Informix datatypes</h1>
<A NAME="TI916"></A><p>The Informix database interfaces support the Informix datatypes
listed in <A HREF="connpbp47.htm#CHDDAJFF">Table 8-1</A> in DataWindow
objects and embedded <ACRONYM title = "sequel" >SQL</ACRONYM>.</p>
<A NAME="CHDDAJFF"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 8-1: Supported datatypes for Informix</caption>
<tr><td  rowspan="1"  ><A NAME="TI917"></A>Blob</td>
<td  rowspan="1"  ><A NAME="TI918"></A>LVarChar</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI919"></A>Boolean</td>
<td  rowspan="1"  ><A NAME="TI920"></A>Money</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI921"></A>Byte (a maximum
of 2^31 bytes)</td>
<td  rowspan="1"  ><A NAME="TI922"></A>NChar</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI923"></A>Char</td>
<td  rowspan="1"  ><A NAME="TI924"></A>NVarChar</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI925"></A>Clob</td>
<td  rowspan="1"  ><A NAME="TI926"></A>Real</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI927"></A>Date</td>
<td  rowspan="1"  ><A NAME="TI928"></A>Serial</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI929"></A>DateTime</td>
<td  rowspan="1"  ><A NAME="TI930"></A>Serial8</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI931"></A>Decimal</td>
<td  rowspan="1"  ><A NAME="TI932"></A>SmallInt (2 bytes)</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI933"></A>Float</td>
<td  rowspan="1"  ><A NAME="TI934"></A>Text (a maximum of 2^31
bytes)</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI935"></A>Int8</td>
<td  rowspan="1"  ><A NAME="TI936"></A>Time</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI937"></A>Integer (4
bytes)</td>
<td  rowspan="1"  ><A NAME="TI938"></A>VarChar (1 to 255 bytes)</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI939"></A>Interval</td>
<td  rowspan="1"  ><A NAME="TI940"></A></td>
</tr>
</table>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Datatype conversion</span> <A NAME="TI941"></A>When you retrieve or update columns, PowerBuilder converts
data appropriately between the Informix datatype and the PowerScript
datatype. Keep in mind, however, that similarly or identically named
Informix and PowerScript datatypes do <i>not</i> necessarily
have the same definitions.</p>
<A NAME="TI942"></A>For information about the definitions of PowerScript
datatypes, see the <i>PowerScript Reference</i>
.</p>
<A NAME="TI943"></A><h2>Informix DateTime datatype</h2>
<A NAME="TI944"></A><p>The <b>DateTime</b> datatype is a contiguous
sequence of boxes. Each box represents a component of time that
you want to record. The syntax is:</p>
<A NAME="TI945"></A><p><p><PRE><b>DATETIME</b> <i>largest_qualifier</i> <b>TO</b> <i>smallest_qualifier</i></PRE></p>
</p>
<A NAME="TI946"></A><p>PowerBuilder defaults to <FONT FACE="Courier New">Year TO Fraction(5)</FONT>.</p>
<A NAME="TI947"></A><p>For a list of qualifiers, see your Informix
documentation.</p>
<A NAME="TI948"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To create your own variation of the DateTime datatype:</p>
<ol><li class=fi><p>In the Database painter, create a table
with a DateTime column.</p><p>For instructions on creating a table, see
the <i>Users Guide</i>
.</p></li>
<li class=ds><p>In the Columns view, select Pending Syntax from
the Objects or pop-up menu. </p><p>The Columns view displays the pending changes to the table
definition. These changes execute only when you click the Save button
to save the table definition.</p></li>
<li class=ds><p>Select Copy from the Edit or pop-up menu or click
the Copy button.</p><p>The <ACRONYM title = "sequel" >SQL</ACRONYM> syntax (or the
portion you selected) is copied to the clipboard.</p></li>
<li class=ds><p>In the <ACRONYM title = "I sequel" >ISQL</ACRONYM> view,
modify the DateTime syntax and execute the <b>CREATE TABLE</b> statement.</p><p>For instructions on using the<ACRONYM title = "I sequel" > ISQL</ACRONYM> view, see the <i>Users
Guide</i>.</p></li></ol>
<br><A NAME="TI949"></A><h2>Informix Time datatype</h2>
<A NAME="TI950"></A><p>The Informix database interfaces also support a time datatype.
The time datatype is a subset of the DateTime datatype. The time
datatype uses only the time qualifier boxes.</p>
<A NAME="TI951"></A><h2>Informix Interval datatype</h2>
<A NAME="TI952"></A><p>The interval datatype is one value or a sequence of values
that represent a component of time. The syntax is:</p>
<A NAME="TI953"></A><p><p><PRE><b>INTERVAL</b> <i>largest_qualifier</i> <b>TO</b> <i>smallest_qualifier</i></PRE></p>
</p>
<A NAME="TI954"></A><p>PowerBuilder defaults to <FONT FACE="Courier New">Day(3) TO Day</FONT>.
For more about interval datatypes, see your Informix documentation.</p>

